﻿<Window
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" x:Class="ILMerger.MainWindow"
        Title="IL Merger [.Net Framework 4.0]" Height="624.528" Width="814.82" WindowStartupLocation="CenterScreen" Icon="/Icon.ico" AllowDrop="True" DragEnter="Window_DragEnter" Drop="Window_Drop">
    <Grid>
		<Grid x:Name="gdLayout">
			<Grid.RowDefinitions>
				<RowDefinition Height="45" />
				<RowDefinition Height="*" />
				<RowDefinition Height="34" />
			</Grid.RowDefinitions>
			<Grid x:Name="gdHeader" Grid.Row="0" Grid.RowSpan="1" Background="#FF539BCB">
				<StackPanel x:Name="spTools" HorizontalAlignment="Right" Margin="0,9,9,9" Orientation="Horizontal" d:LayoutOverrides="Height">
					<Button Content="Import" Height="27" x:Name="btnImport" VerticalAlignment="Center" Click="btnImport_Click" Width="75" BorderThickness="1" Margin="0,0,3,0" />
					<Button Content="Export" Height="27" x:Name="btnExport" VerticalAlignment="Center" Click="btnExport_Click" Width="75" BorderThickness="1" Margin="0,0,6,0" />
					<Button Content="Exit" Height="27" x:Name="btnExit" VerticalAlignment="Center" Click="btnExit_Click" Width="75" />
				</StackPanel>
				<TextBlock HorizontalAlignment="Left" Margin="12,6,6,6" Text="IL Merger Tool" VerticalAlignment="Center" FontSize="20" Foreground="#FFD8F3FF" />
			</Grid>
			<Border x:Name="bdContent" BorderThickness="0,1" BorderBrush="Black" Grid.Row="1" Grid.RowSpan="1">
				<ScrollViewer>
					<Grid x:Name="gdContent" >
						<StackPanel x:Name="spContent" Margin="10">
							<TextBlock TextWrapping="Wrap" Text="Assemblies to merge:" FontSize="13.333" FontWeight="Bold" Foreground="#FF0054B1"/>
                            <ListBox  x:Name="lbAssemblies" Margin="2,3,2,0" BorderBrush="Black" Background="#FFE7F7FF" FontSize="13.333" MinHeight="60" SelectedIndex="0">
                                <ListBox.Resources>
                                    <SolidColorBrush x:Key="{x:Static SystemColors.ControlBrushKey}" Color="#FF0089FF" />
                                    <SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}" Color="#FF0089FF" />                   
                                </ListBox.Resources>
                            </ListBox>
                            <DockPanel Margin="2,3,2,0">
								<StackPanel Orientation="Horizontal" d:LayoutOverrides="Height" DockPanel.Dock="Right">
									<Button x:Name="btnAddAssembly" Content="Add assemblies" Margin="0,0,4,0" Padding="6,1" FontSize="13.333" Click="btnAddAssembly_Click" />
									<Button x:Name="btnClearAssemblies" Content="Clear" Padding="6,1" FontSize="13.333" Click="btnClearAssemblies_Click" />
								</StackPanel>
								<TextBlock x:Name="tbPrimaryAssembly" TextWrapping="Wrap" Text="{Binding SelectedValue, ElementName=lbAssemblies, StringFormat=Primary assembly: \{0\}}" VerticalAlignment="Center" FontSize="13.333"/>
							</DockPanel>
							<TextBlock TextWrapping="Wrap" Text="Options:" FontSize="13.333" Margin="0,6,0,0" FontWeight="Bold" Foreground="#FF0054B1"/>
							<StackPanel Orientation="Vertical" Margin="2,3,2,0">
								<StackPanel HorizontalAlignment="Left" Orientation="Horizontal">
									<CheckBox Content="Union duplicates" Tag="UnionMerge" Margin="0,0,13.223,0" d:LayoutOverrides="Width" FontSize="13.333"/>
									<CheckBox Content="Copy Attributes" Margin="0" d:LayoutOverrides="Width" FontSize="13.333"/>
								</StackPanel>
								<StackPanel HorizontalAlignment="Left" Orientation="Horizontal" Margin="0,8,0,0">
									<CheckBox IsChecked="False" x:Name="cbSign" Content="Sign with key file" Tag="PublicKeyTokens" Margin="0" VerticalAlignment="Top" FontSize="13.333"/>
									<CheckBox Content="Delayed Sign" Tag="###" Margin="13,0,0,0" VerticalAlignment="Top" FontSize="13.333" IsEnabled="{Binding IsChecked, ElementName=cbSign}"/>
								</StackPanel>
								<DockPanel Height="21.96" Margin="0,3,0,0" IsEnabled="{Binding IsChecked, ElementName=cbSign}">
									<Button x:Name="btnBrowseSign" Content="Choose" Width="75" DockPanel.Dock="Right" VerticalAlignment="Top" Click="btnBrowseSign_Click" />
									<TextBox x:Name="tbSign" TextWrapping="Wrap" d:LayoutOverrides="Height" Margin="0,0,3,0" BorderBrush="Black" Background="#FFE7F7FF" IsReadOnly="True" FontSize="13.333"/>
								</DockPanel>
								<CheckBox x:Name="clLog" Content="Generate log file" Tag="Log" Margin="0,8,0,0" HorizontalAlignment="Left" FontSize="13.333"/>
								<DockPanel Height="21.96" Margin="0,3,0,0" IsEnabled="{Binding IsChecked, ElementName=clLog}">
									<Button x:Name="btnBrowseLog" Content="Browse" Width="75" DockPanel.Dock="Right" VerticalAlignment="Top" Click="btnBrowseLog_Click" />
									<TextBox x:Name="tbLog" TextWrapping="Wrap" d:LayoutOverrides="Height" Margin="0,0,3,0" BorderBrush="Black" Background="#FFE7F7FF" IsReadOnly="True" FontSize="13.333"/>
								</DockPanel>
							</StackPanel>
							<Expander Margin="2,9,2,0" BorderBrush="#9E000000">
								<Expander.Header>
									<TextBlock TextWrapping="Wrap" Text="Advanced Options" Width="322.5" FontWeight="Bold" FontSize="13.333"/>
								</Expander.Header>
								<UniformGrid Columns="2" Margin="3">
									<CheckBox Content="Xml Documentation" Margin="0" HorizontalAlignment="Left" FontSize="13.333"/>
									<CheckBox Content="Allow Multiple Assembly Level Attributes" Margin="0,0,-178.734,0" VerticalAlignment="Top" d:LayoutOverrides="Width" FontSize="13.333"/>
									<CheckBox Content="Allow Wild Cards" Margin="0" HorizontalAlignment="Left" VerticalAlignment="Top" FontSize="13.333"/>
									<CheckBox Content="Allow Zero PeKind" Margin="0,0,101.126,0" VerticalAlignment="Top" d:LayoutOverrides="Width" FontSize="13.333"/>
									<CheckBox Content="Closed" Margin="0" HorizontalAlignment="Left" VerticalAlignment="Top" FontSize="13.333"/>
									<CheckBox Content="Internalize" Margin="0" HorizontalAlignment="Left" VerticalAlignment="Top" FontSize="13.333"/>
								</UniformGrid>
							</Expander>
							<TextBlock TextWrapping="Wrap" Text="Output:" FontSize="13.333" Margin="0,11,0,0" FontWeight="Bold" Foreground="#FF0054B1"/>
							<TextBlock TextWrapping="Wrap" Text="Output assembly:" HorizontalAlignment="Left" FontSize="13.333" Margin="2,3,2,0"/>
							<DockPanel Height="21.96" Margin="2,3,2,0">
								<Button x:Name="btnBrowseOutput" Content="Browse" Width="75" DockPanel.Dock="Right" VerticalAlignment="Top" Click="btnBrowseOutput_Click" />
								<TextBox x:Name="tbOutput" TextWrapping="Wrap" d:LayoutOverrides="Height" Margin="0,0,3,0" BorderBrush="Black" Background="#FFE7F7FF" IsReadOnly="True" FontSize="13.333"/>
							</DockPanel>
							<CheckBox Content="Include debug information in Output (Generate PDB file)" Tag="DebugInfo" Margin="3,2,3,0" HorizontalAlignment="Left" FontSize="13.333"/>
							<StackPanel HorizontalAlignment="Left" Margin="3,2,3,0" Orientation="Horizontal">
								<TextBlock TextWrapping="Wrap" Text="Target Framework:" FontSize="13.333" Margin="0,0,4,0" HorizontalAlignment="Left" VerticalAlignment="Center"/>
								<ComboBox x:Name="cbTargetPlatform" d:LayoutOverrides="Width" VerticalAlignment="Center" HorizontalAlignment="Left" MinWidth="166" SelectedIndex="3">
									<ComboBoxItem Content=".NET 1" Tag="v1" FontSize="13.333"/>
									<ComboBoxItem Content=".NET 1.1" ToolTip="v1.1" FontSize="13.333"/>
									<ComboBoxItem Content=".NET 2.0/3.0/3.5/3.5 SP1" ToolTip="v2" FontSize="13.333"/>
									<ComboBoxItem Content=".NET 4.0" Tag="v4" FontSize="13.333"/>
								</ComboBox>
							</StackPanel>
						</StackPanel>
					</Grid>
				</ScrollViewer>
			</Border>
			<Grid x:Name="gdFooter" Grid.Row="2" Grid.RowSpan="1" Background="#FF005289">
                <StackPanel HorizontalAlignment="Left" Margin="6" Orientation="Horizontal"> 
                <Image Width="74" Height="21" Margin="0,0,6,0" Source="/ILMerger;component/Images/btn_donate_SM.gif" Cursor="Hand" MouseLeftButtonUp="btnDonate_Click"/>
                <TextBlock FontSize="12" Foreground="#FFA3F8FF" Text="Based on Microsoft Research ILMerge. Made by Adam Juhos (eTech-Studio Kft)." VerticalAlignment="Center" />         
                </StackPanel>
				<Button Content="Begin Merge" Height="22" HorizontalAlignment="Right" Margin="6" x:Name="btnMerge" VerticalAlignment="Center" Width="110" Click="btnMerge_Click" />
			</Grid>
		</Grid>
		<Grid x:Name="gdOverlay" Background="#D7000000" Visibility="Collapsed">
			<Border HorizontalAlignment="Center" Height="65" VerticalAlignment="Center" Width="250" CornerRadius="10" Background="Black">
				<Grid>
					<TextBlock HorizontalAlignment="Center" TextWrapping="Wrap" Text="Please wait..." VerticalAlignment="Center" FontSize="21.333" Foreground="#FFBABABA"/>
				</Grid>
			</Border>
		</Grid>
	</Grid>
</Window>
